<template>
  <NuxtLayout name='home'>
    <div class="flex flex-col" v-if="homePageIndexStore.statusbarIndex == 0">
      <!-- 首页的轮播图组件 -->
      <AppsDefineHomeCardComponent :array="testVIewPage" />
      <!-- 用户功能选项卡 -->
      <AppsDefineHomeCardVanGripComponent :array="testVIewPage" :column="3" />
      <!-- 用户订单组件 -->
      <AppsDefineHomeOrderComponent :array="Array(3)" />
    </div>
    <div class="flex-default" v-else-if="homePageIndexStore.statusbarIndex == 1">
      1
    </div>
  </NuxtLayout>
</template>

<script lang="ts" setup>
const homePageIndexStore = useMyHomePageIndexStore()
const testVIewPage: Array<useDefineHomePageCardItemComponent> = [
  { id: "1", backGroundImageUrl: "https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg", textContext: "九型人格测试", textDecontext: "九型人格测试九型人格测试九型人格测试九型人格测试九型人格测试九型人格测试" },
  { id: "2", backGroundImageUrl: "https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg", textContext: "九型人格测试", textDecontext: "九型人格测试九型人格测试九型人格测试九型人格测试九型人格测试九型人格测试" },
  { id: "3", backGroundImageUrl: "https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg", textContext: "九型人格测试", textDecontext: "九型人格测试九型人格测试九型人格测试九型人格测试九型人格测试九型人格测试" },
]
definePageMeta({
  layout: false,
})
onBeforeMount(() => {
  homePageIndexStore.initCustomFormatter()
})
</script>
